<%@ page import="java.util.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%@ include file="../header.jsp"%>
<%
	List<HashMap> list = (List<HashMap>)request.getAttribute("list");
	HashMap data = (HashMap)request.getAttribute("data");
	String[] gallery = data.get("R_PATH").toString().split(",");
	String[] summer = {"비수기","여름성수기","겨울성수기"};
%>
	<script type="text/javascript">
		function Move(R_NO){
			var movedata = document.movedata;
			movedata.ROOMNUM.value = R_NO;
			movedata.action="<%=path%>/detailroom.rm";
			movedata.method="post";
			movedata.submit();
		}
	</script>
	<form name="movedata">
		<input type="hidden" name="ROOMNUM"/>
	</form>
	
  <div id="sub_img">
		<img src="<%=path %>/images/13584890540.jpg" width="1000" height="372" alt="">
	</div>

	
	<form name="search_reserve_fm" onsubmit="return false">
<%@ include file="/quickreserve.jsp" %>
	</form>
	
  <div id="container">
    <div id="scontents">
		<script type="text/javascript">initNavigation('3');</script>
			<script type="text/javascript">
				window.onload = function() {
					displaytype(1,3,'price_tab','price_box');
				}
			</script>
    	<h2 id="sub_title"><span class="Etitle">ROOM PREVIEW</span><span class="ktitle">객실보기</span></h2>
			<!-- 객실목록 -->
<div class="room_navi">
      	<h3 class="disp_no">다른객실 바로가기</h3>
      		<c:forEach var="li" items="${list }">
<%-- 				<a href="<%=path%>/detailroom.rm?R_NO=${li.R_NO}" target="_self"><img src="http://h-ps011u.monowebs.co.kr/upfiles/room/13461218741.jpg" width="67" height="44"><span>${li.R_NAME }</span></a> --%>
				<a href="javascript:Move(${li.R_NO})" target="_self"><img src="http://h-ps011u.monowebs.co.kr/upfiles/room/13461218741.jpg" width="67" height="44"><span>${li.R_NAME }</span></a>
			</c:forEach>
      </div>
      
      
      <div id="room1" class="room_style1">
      	<h3 class="con_title"><%=data.get("R_NAME") %></h3>
        <ul class="room_info">
					<li><span class="t">객실설명 : </span><%=data.get("R_COMMENT") %></li>
        	<li><span class="t">객실유형 : </span><%=data.get("R_TYPE") %></li>
        	<li><span class="t">면 적 : </span><%=data.get("R_SIZE") %>평</li>
        	<li><span class="t">집기시설 : </span><%=data.get("R_OPTION") %></li>
        </ul>
        <div class="room_price">
          <ul id="price_tab">
            <li id="price_tab_1" class="on"><a href="javascript:displaytype(1,3,'price_tab','price_box');"><strong>비수기</strong></a></li>
            <li id="price_tab_2" class=""><a href="javascript:displaytype(2,3,'price_tab','price_box');"><strong>여름성수기</strong></a></li>
            <li id="price_tab_3" class=""><a href="javascript:displaytype(3,3,'price_tab','price_box');"><strong>겨울성수기</strong></a></li>
          </ul>
          <div id="price_box">
          
			<%for(int i=1;i<=3;i++){%>
        	<div id="price_box_<%=i%>" style="display: block;">
              <table class="tb_price_R" cellpadding="0" cellspacing="0" border="0" width="100%" summary="객실요금표-비수기">
                <colgroup>
                  <col width="12.5%">
                  <col width="12.5%">
                  <col width="25%">
                  <col width="25%">
                </colgroup>
                <thead>
                  <tr>
                    <td colspan="2">수용인원</td>
                    <td class="last" colspan="3"><%=summer[i-1]%></td>
                  </tr>
                  <tr>
                    <td>기준</td>
                    <td>최대</td>
                    <td>주중요금</td>	
                    <td class="last">주말요금</td>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td><%=data.get("R_MIN") %></td>
                    <td><%=data.get("R_MAX") %></td>
                    <%if(i==1){%>
                    <td><%=data.get("R_WEEK") %></td>
                    <td class="last"><%=data.get("R_WEEKEND") %></td>
                    <%} else if(i==2){%>
                    <td><%=data.get("R_SWEEK") %></td>
                    <td class="last"><%=data.get("R_SWEEKEND") %></td>
                    <%} else if(i==3){%>
                    <td><%=data.get("R_WWEEK") %></td>
                    <td class="last"><%=data.get("R_WWEEKEND") %></td>
                    <%} %>
                  </tr>
                </tbody>
              </table>
            </div>
            <%} %>
            
          </div>
        </div>
      </div>
      <div id="gallery">
		<c:forEach  var="gl" items="<%=gallery %>">
				<img src="<%=path %>/images/${gl}">
		</c:forEach>
      </div>
			<!-- 객실목록 -->
<iframe width="0" height="0" name="hiddenframe" style="display:none;"></iframe>		</div>


<%@include file="../footer.jsp"%>